/PROG  PNS0047
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53160691/93";
PROG_SIZE	= 3362;
CREATE		= DATE 15-06-10  TIME 09:21:00;
MODIFIED	= DATE 25-04-29  TIME 18:24:30;
FILE_NAME	= PNS0018;
VERSION		= 0;
LINE_COUNT	= 118;
MEMORY_SIZE	= 3826;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R23 ;
   6:  !  PROGRAM: PNS0047 ;
   7:  !  PART:53160691/93  ;
   8:  !ZYL2015.7.9********************* ;
   9:   ;
  10:  !INITIALIZE ;
  11:  OVERRIDE=20% ;
  12:  MOVE TO HOME    ;
  13:  R[14]=90    ;
  14:  R[18]=1    ;
  15:  R[19]=.2    ;
  16:   ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[3] ;
  24:  R[5]=10    ;
  25:  OVERRIDE=R[5] ;
  26:  !INITIATE TO PICK-POUNCE ;
  27:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  28:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  29:  PAUSE ;
  30:  R[1]=0    ;
  31:  TIMER[1]=RESET ;
  32:  TIMER[1]=START ;
  33:   ;
  34:  LBL[10:TOP OF LOOF] ;
  35:  OVERRIDE=R[5] ;
  36:   ;
  37:  TIMER[3]=STOP ;
  38:  TIMER[2]=STOP ;
  39:  R[1]=R[1]+1    ;
  40:  R[2]=TIMER[2]    ;
  41:  R[3]=60/R[2]    ;
  42:  R[8]=TIMER[3]    ;
  43:  TIMER[2]=RESET ;
  44:  TIMER[2]=START ;
  45:  TIMER[3]=RESET ;
  46:   ;
  47:  !PROCEED TO PICK ;
  48:  LBL[20] ;
  49:  IF DI[1]=ON AND DI[3]=ON AND DI[8]=ON,JMP LBL[25] ;
  50:  IF DI[29]=ON,JMP LBL[90] ;
  51:  JMP LBL[20] ;
  52:   ;
  53:  LBL[25] ;
  54:  WAIT DI[1]=ON AND DI[3]=ON AND DI[8]=ON    ;
  55:  TIMER[3]=START ;
  56:  R[5]=100    ;
  57:  OVERRIDE=R[5] ;
  58:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  59:   ;
  60:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  61:  PAYLOAD[4] ;
  62:  CALL CHK_PICK    ;
  63:  MONITOR Z_CHECH ;
  64:J P[5:PICK DEPART] 100% CNT70 ACC100 TA R[20]sec,DO[5]=PULSE,1.0sec    ;
  65:  DO[8]=PULSE,1.0sec ;
  66:  LBL[27] ;
  67:  CALL CHECKPICK    ;
  68:  IF DI[9]=OFF OR DI[11]=OFF,JMP LBL[27] ;
  69:   ;
  70:J P[7:PICK CLEAR] 100% CNT100 ACC110    ;
  71:  LBL[30:GOTO DROP POUNCE] ;
  72:J P[8:DROP POUNCE] 100% CNT100 ACC110 BREAK    ;
  73:  TIMER[3]=STOP ;
  74:  LBL[40:AT DROP POUNCE] ;
  75:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  76:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  77:  IF DI[18]=ON,JMP LBL[60] ;
  78:  JMP LBL[40] ;
  79:   ;
  80:  LBL[50:MOVE DROP SNEAK] ;
  81:  TIMER[3]=START ;
  82:  OVERRIDE=R[5] ;
  83:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  84:  LBL[51:DROP OR C-P-S] ;
  85:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  86:  IF DI[18]=ON,JMP LBL[40] ;
  87:  JMP LBL[51] ;
  88:  JMP LBL[50] ;
  89:   ;
  90:  LBL[60:MOVE CLS-PRS-ACC] ;
  91:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  92:  PAUSE ;
  93:  JMP LBL[30] ;
  94:   ;
  95:  LBL[80:DROP ENABLED] ;
  96:  !PROCEED TO DROP ;
  97:  TIMER[3]=START ;
  98:  OVERRIDE=R[5] ;
  99:J P[10:DROP APPROACH] 100% CNT100 ACC100    ;
 100:  MONITOR END Z_CHECH ;
 101:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 102:  DO[6]=PULSE,1.0sec ;
 103:  PAYLOAD[3] ;
 104:  CALL CHK_DROP    ;
 105:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7]=PULSE,1.0sec    ;
 106:  !GOTO PICK POUNCE ;
 107:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 108:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 109:  IF DI[29]=ON,JMP LBL[90] ;
 110:  JMP LBL[10] ;
 111:   ;
 112:  LBL[90:END OF CYCLE] ;
 113:  TIMER[1]=STOP ;
 114:  R[4]=TIMER[1]    ;
 115:J P[1:MIDDLE] 50% CNT100    ;
 116:  MOVE TO HOME    ;
 117:   ;
 118:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -956.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.255  mm,	Y =  1567.001  mm,	Z = -1152.137  mm,
	W =   179.327 deg,	P =     1.368 deg,	R =   150.804 deg,
	E1=   134.033 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2673.601  mm,	Y =  3276.007  mm,	Z = -1039.216  mm,
	W =  -179.985 deg,	P =     -.680 deg,	R =    90.630 deg,
	E1=   193.552 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2674.011  mm,	Y =  3276.103  mm,	Z = -1186.186  mm,
	W =   179.595 deg,	P =     -.671 deg,	R =    90.633 deg,
	E1=   193.551 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2674.011  mm,	Y =  3276.103  mm,	Z =  -984.828  mm,
	W =   179.595 deg,	P =     -.671 deg,	R =    90.633 deg,
	E1=   193.551 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2191.770  mm,	Y =  1714.601  mm,	Z =  -989.832  mm,
	W =   179.440 deg,	P =     -.137 deg,	R =   141.157 deg,
	E1=   143.027 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2099.980  mm,	Y = -1186.198  mm,	Z = -1000.000  mm,
	W =   179.989 deg,	P =      .454 deg,	R =  -154.459 deg,
	E1=    78.641 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2339.458  mm,	Y = -2351.267  mm,	Z =  -981.456  mm,
	W =  -179.701 deg,	P =      .268 deg,	R =  -124.783 deg,
	E1=    48.962 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2653.846  mm,	Y = -3244.502  mm,	Z =  -981.959  mm,
	W =   179.496 deg,	P =    -4.006 deg,	R =   -92.192 deg,
	E1=    17.205 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2653.845  mm,	Y = -3244.502  mm,	Z = -1117.159  mm,
	W =   179.496 deg,	P =    -4.006 deg,	R =   -92.192 deg,
	E1=    17.205 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2653.846  mm,	Y = -3244.501  mm,	Z = -1045.959  mm,
	W =   179.496 deg,	P =    -4.006 deg,	R =   -92.192 deg,
	E1=    17.205 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2198.382  mm,	Y = -1431.897  mm,	Z = -1047.568  mm,
	W =  -179.274 deg,	P =      .451 deg,	R =  -145.449 deg,
	E1=    69.927 deg
};
/END
